const state = {
    token: '',
}

const mutations = {
    setToken(state, str) {
        state.token = str
    },
}

const actions = {
    setToken1({ commit }, str) {
        return new Promise((resolve) => {
            setTimeout(() => {
                commit('setToken', str)
                resolve()
            }, 1000)
        })
    }
}

export default {
    namespaced: true,
    state,
    mutations,
    actions
}